package com.liu.proxy.core.handler;


import com.liu.proxy.core.handler.TypeHandler;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author LIU
 * @version 1.0
 * @description TODO
 * @date 2024/1/16 11:34
 */
public class StringTypeHandler  implements TypeHandler<String> {
    @Override
    public void setParameter(PreparedStatement statement, int i, String value) throws SQLException {
        statement.setString(i,value);
    }

    @Override
    public String getResult(ResultSet rs, String columnName) throws SQLException {
        return rs.getString(columnName);
    }
}
